﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;

namespace Zhaoxi.SqlSugar.Models
{
    [Tenant("db1")] //实体标为db1 - 通过这个特性实现跨库查询操作 - db1是数据库ConfigId
    public class OrderHead
    {
        [SugarColumn(IsPrimaryKey = true)]
        public int Id { get; set; }
        public string? Name { get; set; }
        public decimal Price { get; set; }
        [SugarColumn(IsNullable = true)]
        public DateTime CreateTime { get; set; }
        [SugarColumn(IsNullable = true)]
        public int CountInfo { get; set; }
        [Navigate(NavigateType.OneToMany, nameof(OrderItem.OrderId))]// 导航属性协助跨库查询操作
        public List<OrderItem> Items { get; set; }
    }
}
